package org.example.huweb.web.sys_Carousel.copyMapper;

import org.example.dto.Carousel.addCarouselDTO;
import org.example.entity.SysCarouselRole;
import org.example.vo.CarouseListVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(componentModel = "spring")
public abstract class copyCarousel {
    public static final copyCarousel INSTANCE = Mappers.getMapper(copyCarousel.class);
    @Mapping(target = "cRemark", source = "remark")
    @Mapping(target = "cUrl", source = "url")
    @Mapping(target = "cIsShow", source = "isShow")
    public abstract SysCarouselRole addCarouselDTOToSysCarouselRole(addCarouselDTO sysCarouselRole);


    @Mapping(target = "id", source = "CId")
    @Mapping(target = "title", source = "CRemark")
    @Mapping(target = "imageSrc", source = "CUrl")
    public abstract CarouseListVo SysCarouselRoleToCarouseListVo(SysCarouselRole sysCarouselRoles);

    public abstract List<CarouseListVo> ListSysCarouselRoleToCarouseListVo(List<SysCarouselRole> sysCarouselRoles);
}
